Set Mode of IO Port
Function:
magician.set_multiplexing(io, multiplex)Description: set mode of IO port
Required parameter:
- io: io port number, data type: str, range: "DO_01"~"DO_20"
- multiplex: mode of IO port, range: 0~6
- 0: IOFunctionDummy, no function configured
- 1: IOFunctionDO, IO output
- 2: IOFunctionPWM, PWM output
- 3: IOFunctionDI, IO input
- 4: IOFunctionADC, AD input
- 5: IOFunctionDIPU, pull-up input
- 6: IOFunctionDIPD, pull-down input
- Return:
- True: The command has been finished.
- False: The command has not been finished.
Example
magician.set_multiplexing(io="DO_01", multiplex=1)Set the mode of DO_01 port as IO output.